import request from '@/utils/request'
export const getOrderList = params =>
	request({
		url: '/admin-api/order/page',
		method: 'get',
		params
	})
//核销
export const pickUpById = data =>
	request({
		url: '/admin-api/order/pick-up-by-id',
		method: 'put',
		data
	})
export const categoryPage = data =>
	request({
		//宠物列表
		url: '/admin-api/system/pet/category/page',
		method: 'post',
		data
	})
export const categoryCreateChild = data =>
	request({
		//创建子类
		url: '/admin-api/system/pet/category/createChild',
		method: 'post',
		data
	})
export const categoryUpdate = data =>
	request({
		//宠物更新
		url: '/admin-api/system/pet/category/update',
		method: 'post',
		data
	})
export const categoryCreate = data =>
	request({
		//创建父类
		url: '/admin-api/system/pet/category/create',
		method: 'post',
		data
	})
export const categoryGet = params =>
	request({
		//分类详情
		url: '/admin-api/system/pet/category/get',
		params
	})
export const categoryDelete = params =>
	request({
		//删除
		url: '/admin-api/system/pet/category/delete',
		params
	})
// 基础设置分类
export const productUpdate = data =>
	request({
		//更新商品分类
		url: '/admin-api/product/category/update',
		method: 'put',
		data
	})
export const productCreate = data =>
	request({
		//创建商品分类
		url: '/admin-api/product/category/create',
		method: 'post',
		data
	})
export const productChild = data =>
	request({
		//创建商品子分类
		url: '/admin-api/product/category/create/child',
		method: 'post',
		data
	})
export const productList = params =>
	request({
		//商品分类列表
		url: '/admin-api/product/category/list',
		params
	})
export const productGet = params =>
	request({
		//商品分类详情
		url: '/admin-api/product/category/get',
		params
	})
export const productDelete = params =>
	request({
		//商品分类删除
		url: '/admin-api/product/category/delete',
		method: 'DELETE',
		params
	})


export const getSpuUpdate = data =>
	request({
		//更新商品
		url: '/admin-api/product/spu/update',

		method: 'PUT',
		data

	})
export const getSpuCreate = data =>
	request({
		//创建商品
		url: '/admin-api/product/spu/create',
		method: 'post',
		data
	})
export const getSpuPage = params =>
	request({
		//商品分页
		url: '/admin-api/product/spu/page',
		params
	})
export const getSpuList = params =>
	request({
		//商品 SPU 详情列表
		url: '/admin-api/product/spu/list',
		params
	})
export const getSpuListAllSimple = params =>
	request({
		//商品 SPU 精简列表
		url: '/admin-api/product/spu/list-all-simple',
		params
	})
export const getSpugetdetail = params =>
	request({
		//商品 SPU 明细
		url: '/admin-api/product/spu/get-detail',
		params
	})
export const getSpuDelete = params =>
	request({
		//删除商品 SPU
		url: '/admin-api/product/spu/delete',
		method: 'DELETE',
		params
	})

export const getStoreList = params =>
	request({
		// 店铺列表
		url: '/admin-api/system/store/page',
		method: 'post',
		data: params
	})

export const upStore = params =>
	request({
		// 更新店铺
		url: '/admin-api/system/store/update',
		method: 'post',
		data: params
	})

export const createStore = params =>
	request({
		// 新增店铺
		url: '/admin-api/system/store/create',
		method: 'post',
		data: params
	})

export const getArea = params =>
	request({
		// 地区
		url: '/admin-api/system/area/tree',
		method: 'get',
		params
	})

export const getBusiness = params =>
	request({
		// 商家列表
		url: '/admin-api/system/merchant/page',
		method: 'post',
		data: params
	})

export const createBussiness = params =>
	request({
		// 创建商家
		url: '/admin-api/system/merchant/create',
		method: 'post',
		data: params
	})

export const approveBussiness = params =>
	request({
		// 审核商家
		url: '/admin-api/system/merchant/approve',
		method: 'post',
		data: params
	})

export const getStaff = params =>
	request({
		// 获取美容师
		url: '/admin-api/system/staff/page',
		method: 'post',
		data: params
	})

export const addStaff = params =>
	request({
		// 新增美容师
		url: '/admin-api/system/staff/create',
		method: 'post',
		data: params
	})

export const updateStaff = params =>
	request({
		// 修改美容师
		url: '/admin-api/system/staff/update',
		method: 'put',
		data: params
	})

export const deleteStaff = id =>
	request({
		// 删除美容师
		url: '/admin-api/system/staff/delete/' + id,
		method: 'delete',
	})

//可选店铺/admin-api/system/store/list
export const storelist = params =>
	request({
		// 修改美容师
		url: '/admin-api/system/store/list',
		method: 'get',
		data: params
	})
//更新服务商品/admin-api/product/service/update
export const serviceupdate = data =>
	request({
		// 修改美容师
		url: '/admin-api/product/service/update',
		method: 'put',
		data: data
	})
//创建服务商品/admin-api/product/service/update
export const servicecreate = data =>
	request({
		// 修改美容师
		url: '/admin-api/product/service/create',
		method: 'post',
		data: data
	})
//服务商品详情
export const serviceget = params =>
	request({
		// 修改美容师
		url: '/admin-api/product/service/get',
		method: 'get',
		params: params
	})

//服务商品删除
export const servicedelect = params =>
	request({
		// 修改美容师
		url: '/admin-api/product/service/delete',
		method: 'DELETE',
		params: params
	})

// 获取优惠券
export const getCoupon = params =>
	request({
		url: "/admin-api/promotion/coupon-template/page",
		method: 'get',
		params
	})

// 获取优惠券
export const couponDelete = params =>
	request({
		url: "/admin-api/promotion/coupon-template/delete",
		method: 'DELETE',
		params
	})

// 删除砍价活动
export const bargainDelete = params =>
	request({
		url: "/admin-api/promotion/bargain-activity/delete",
		method: 'DELETE',
		params
	})

// 拼团活动
export const getActivity = params =>
	request({
		url: "/admin-api/promotion/combination-activity/page",
		method: 'get',
		params
	})
// 更新拼团
export const upadteActivity = params =>
	request({
		url: "/admin-api/promotion/combination-activity/update",
		method: 'put',
		data: params
	})

// 更新拼团
export const createActivity = params =>
	request({
		url: "/admin-api/promotion/combination-activity/create",
		method: 'post',
		data: params
	})


// 精简商品列表
export const getSimple = params =>
	request({
		url: "/admin-api/product/spu/list-all-simple",
		method: 'get',
		params
	})

// 砍价活动
export const getBargain = params =>
	request({
		url: "/admin-api/promotion/bargain-activity/page",
		method: 'get',
		params
	})

// 更新砍价活动
export const updateBargain = params =>
	request({
		url: "/admin-api/promotion/bargain-activity/update",
		method: 'put',
		data: params
	})

// 创建砍价活动
export const createBargain = params =>
	request({
		url: "/admin-api/promotion/bargain-activity/create",
		method: 'post',
		data: params
	})

// 审核店铺
export const approveStore = params =>
	request({
		url: "/admin-api/system/store/approve",
		method: 'post',
		data: params
	})

// 医生订单
export const getDocOrder = params =>
	request({
		url: "/admin-api/admin/consultation/order/page",
		method: 'post',
		data: params
	})
//订单详情
export const deductionDetail = params =>
	request({
		url: "/admin-api/order/get-detail",
		method: 'get',
		params
	})
// 科室
export const getDoctorDept = () =>
	request({
		url: "/admin-api/system/dict-type/get?type=common_doctor_dept",
		method: 'get',
	})


// 审核医生
export const approveDoc = params =>
	request({
		url: "/admin-api/member/doctor/approve/status",
		method: 'put',
		data: params
	})

// 获取banner图位置
export const getBannerPos = params =>
	request({
		url: "/admin-api/promotion/banner/position/page",
		method: 'get',
		params
	})

// 更新banner图位置
export const updateBannerPos = params =>
	request({
		url: "/admin-api/promotion/banner/position/update",
		method: 'put',
		data: params
	})

// 创建banner图位置
export const createBannerPos = params =>
	request({
		url: "/admin-api/promotion/banner/position/create",
		method: 'post',
		data: params
	})

export const deleteBannerPos = params =>
	request({
		url: "/admin-api/promotion/banner/position/delete/" + params,
		method: 'delete',
		// data:params
	})
export const deleteCombination = params =>
	request({
		url: "/admin-api/promotion/combination-activity/delete",
		method: 'delete',
		params: params
	})
export const getInfo = params =>
	request({
		url: "/admin-api/promotion/combination-activity/get",
		method: 'get',
		params
	})
// 获取banner
export const getBanner = params =>
	request({
		url: "/admin-api/promotion/banner/page",
		method: 'get',
		params
	})

export const createBanner = params =>
	request({
		url: "/admin-api/promotion/banner/create",
		method: 'post',
		data: params
	})

export const updateBanner = params =>
	request({
		url: "/admin-api/promotion/banner/update",
		method: 'put',
		data: params
	})

export const deleteBanner = params =>
	request({
		url: "/admin-api/promotion/banner/delete",
		method: 'delete',
		params
	})
//订单核销
export const orderPick = params =>
	request({
		url: "/admin-api/order/pick-up-by-verify-code",
		method: 'put',
		params: params
	})
//订单取消
export const orderCancel = params =>
	request({
		url: "/admin-api/order/cancel",
		method: 'delete',
		params: params
	})
//订单发货
export const deliveryOrder = params =>
	request({
		url: "/admin-api/order/delivery",
		method: 'put',
		data: params
	})
//更新宠物圈动态内容
export const trendsSave = params =>
	request({
		url: "/admin-api/member/content/update",
		method: 'put',
		data: params
	})
//创建宠物圈动态内容
export const trendsAdd = params =>
	request({
		url: "/admin-api/member/content/create",
		method: 'POST',
		data: params
	})
//保存会员配置
export const scoreSave = params =>
	request({
		url: "/admin-api/member/config/save",
		method: 'PUT',
		data: params
	})
//查询会员配置
export const scoreGet = params =>
	request({
		url: "/admin-api/member/config/get",
		method: 'GET',
		data: params
	})
//删除字典数据
export const dictDataDelete = params =>
	request({
		url: "/admin-api/system/dict-data/delete",
		method: 'delete',
		params: params
	})
//查询字典数据详细
export const dictDataList = params =>
	request({
		url: "/admin-api/system/dict-data/get",
		method: 'GET',
		params: params
	})
//查询字典数据详细
export const createDataType = params =>
	request({
		url: "/admin-api/system/dict-data/create",
		method: 'POST',
		data: params
	})
//查询字典数据详细
export const updateDataType = params =>
	request({
		url: "/admin-api/system/dict-data/update",
		method: 'PUT',
		data: params
	})

//删除药品
export const medicineDelete = params =>
	request({
		url: "/admin-api/system/medicine/delete",
		method: 'get',
		params: params
	})
//获得药品分页
export const medicineList = params =>
	request({
		url: "/admin-api/system/medicine/page",
		method: 'POST',
		data: params
	})
//创建药品
export const medicineCreate = params =>
	request({
		url: "/admin-api/system/medicine/create",
		method: 'POST',
		data: params
	})
//更新药品
export const medicineUpdate = params =>
	request({
		url: "/admin-api/system/medicine/update",
		method: 'POST',
		data: params
	})

// 删除店铺
export const delStore = params =>
	request({
		url: "/admin-api/system/store/delete",
		method: 'get',
		params
	})